package com.lzy.system.organization.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lzy.exception.BusException;
import com.lzy.system.organization.dto.SysCompanyDTO;
import com.lzy.system.organization.entity.SysCompany;

import java.util.List;

/**
 * description: 公司信息管理 <br>
 * date: 2023/11/12 下午10:46 <br>
 * author: lcc <br>
 * version: 1.0 <br>
 */
public interface ISysCompanyService extends IService<SysCompany> {
    /**
     * 新增公司
     * @param sysCompanyDTOList
     * @throws Exception
     */
    public boolean addCompany(List<SysCompanyDTO> sysCompanyDTOList) throws BusException;

    /**
     * 修改公司
     * @param sysCompanyDTOList
     * @throws BusException
     */
    public boolean updateCompany(List<SysCompanyDTO> sysCompanyDTOList) throws BusException;

    /**
     * 删除
     * @param ids
     * @return
     * @throws Exception
     */
    public boolean delById(String ids) throws BusException;


    /**
     * 查询公司
     * @param company_name
     * @param company_no
     * @param limit
     * @param page
     * @return
     * @throws Exception
     */
    public IPage<SysCompany> getCompanyList(String company_name, String company_no, int limit, int page) throws BusException;

    /**
     * 设置默认公司
     * @param id
     * @return
     * @throws BusException
     */
    public boolean setDef(int id) throws BusException;
}
